package com.download.web.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.download.web.entity.SysNavBar;
import com.download.web.service.ISysNavBarService;
import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * @description: 导航菜单控制类
 * @author: cmy
 * @create: 2019-02-21 12:17
 **/
@Controller
public class NavController {

    private ISysNavBarService sysNavBarService;

    /**
     * 按父级id查找子级菜单
     * @param parentId
     * @return
     */
    public List<SysNavBar> navBarListByParent( Integer parentId){
        List<SysNavBar> navBarList=sysNavBarService.list(new QueryWrapper<SysNavBar>().eq("parentId",parentId));

        return navBarList;
    }




}
